#ifndef __Orion_LCD_H
#define __Orion_LCD_H
#include "MR88FX02.h"
#include "Orion_System.h"
/*******************************
uint8_t 			DIP_COM------
				<BIT>		COM7	COM6	COM5	COM4	COM3	COM2	COM1	COM0
				<Note>	1:used 0:not used,com0 and com3 is always on,others is determined to COMNUM

uint32_t 			DIP_SEG------
				<BIT>		SEG27	SEG26	SEG25......	SEG3	SEG2	SEG1	SEG0
				<Note>	1:used 0:not used

enum_Flickcom	 FLK_COM------
				<BIT>		3Bit
				<Note>	only 1bit used for flick
********************************/

typedef enum{
	VDD_X_0P500=3,	//0.5*VDD5V
	VDD_X_0P522,
	VDD_X_0P545,	
	VDD_X_0P571,		
	VDD_X_0P600,	
	VDD_X_0P632,	
	VDD_X_0P666,	
	VDD_X_0P706,	
	VDD_X_0P750,	
	VDD_X_0P800,	
	VDD_X_0P857,	
	VDD_X_0P922,	
	VDD_X_1P000,	
} enum_VLCD;
typedef enum{
	BIAS_1DIV3=0,	//  1/3 BIAS
	BIAS_1DIV4,		//  1/4 BIAS
} enum_BIAS;

typedef enum{
	ACLASS=0,	//  a class
	BCLASS,		//  b class
} enum_Class;

typedef enum{
	BIAS_RES_900KR=0,		
	BIAS_RES_225KR,		
	BIAS_RES_60K,
} enum_Driver;



typedef enum{
	Flickcom0=0,
	Flickcom1,
	Flickcom2,
	Flickcom3,
	Flickcom4,
	Flickcom5,
	Flickcom6,
	Flickcom7,
	FlickNone,
}enum_Flickcom;
typedef enum{
	Noflick=0,
	Flick=1,
}enum_Dspflick;

typedef enum{
	ALL_Flick=0,
	PART_Flick=1,
}enum_Flickmode;

typedef struct
{
	enum_VLCD 			vlcd;			//LCDC->LCDBIAS.LCDBIAS Default 0xf
	enum_BIAS 			lcdbias;
	enum_Class   	  lcdclass;
	uint8_t					lcddspcom;	//COM number:4-8
	uint32_t				lcddspseg;	//SEG valid: bit0-bit27  SEG1-SEG28
	enum_Dspflick   lcdwithflick;	//if use flick mode set 1 or set 0 and flick parameters not cared
	enum_Flickcom		lcdflickcom;
	enum_Flickmode  lcdflickmode;
	uint8_t					lcdflickton;
	uint8_t					lcdflicktoff;
}lcd_initstruct;


void LCD_Initial(lcd_initstruct * lcdinitstruct);
void LCD_DSP_Data(uint8_t com,uint32_t data);	//for com0
void LCD_Flick_Data(uint32_t data);	//for flick 
void LCD_DSP_Cmd(FunctionalState enable);
void LCD_Flick_Cmd(FunctionalState enable);	


#endif

